package com.yc.lame;

import com.yc.yclibx.file.YcFileUtils;

import java.io.File;

/**
 *
 */
public class LameUtil {
    static {
        System.loadLibrary("native-lib");
    }

    public static native void test(String wav, String mp3);

    //
    public static void wavToMp4() {
        String wavPath = YcFileUtils.SD_PATH + File.separator + "hz1000_wav.wav";
        String mp3Path = YcFileUtils.SD_PATH + File.separator + "new2_hz1000.mp3";
        YcFileUtils.createFile(mp3Path);
        test(wavPath, mp3Path);
//        test2(wavPath, mp3Path, 44100, 2, 44100, -1, 0, 9);
    }

    public static native void test2(String wav, String mp3, int inSampleRate, int inChannels, int outSampleRate, int byteRate, int mode, int quality);
}
